package org.vectrics.user;

import java.io.Serializable;
import java.util.Date;

import org.vectrics.common.db.Auditable;
import org.vectrics.common.db.Voidable;
import org.vectrics.domain.Domain;

public class PersonPrivilegeGroup implements Auditable, Serializable, Voidable  {
	
	private static final long serialVersionUID = 2793677128274017428L;
	
	private Long id = null;
	private Domain domain = null;
	private Person person = null;
	private PersonPrivilegeGroupType personPrivilegeGroupType = null;
	private Date dateStart = null;
	private Date dateEnd = null;
	private Person createdBy = null;
	private Date createdDate = null;
	private Person lastModifiedBy = null;
	private Date lastModifiedDate = null;
	private boolean global = true;
	private boolean voided = false;
	
	public PersonPrivilegeGroup() {
		super();
	}

	public boolean logEntityChanges() {
		return(false);
	}

	/**
	 * @return Returns the domain.
	 */
	public Domain getDomain() {
		return domain;
	}

	/**
	 * @param domain The domain to set.
	 */
	public void setDomain(Domain domain) {
		this.domain = domain;
	}

	/**
	 * @return Returns the person.
	 */
	public Person getPerson() {
		return person;
	}

	/**
	 * @param person The person to set.
	 */
	public void setPerson(Person person) {
		this.person = person;
	}

	/**
	 * @return Returns the personPrivilegeGroupType.
	 */
	public PersonPrivilegeGroupType getPersonPrivilegeGroupType() {
		return personPrivilegeGroupType;
	}

	/**
	 * @param personPrivilegeGroupType The personPrivilegeGroupType to set.
	 */
	public void setPersonPrivilegeGroupType(
			PersonPrivilegeGroupType personPrivilegeGroupType) {
		this.personPrivilegeGroupType = personPrivilegeGroupType;
	}

	/**
	 * @return Returns the createdBy.
	 */
	public Person getCreatedBy() {
		return createdBy;
	}

	/**
	 * @param createdBy The createdBy to set.
	 */
	public void setCreatedBy(Person createdBy) {
		this.createdBy = createdBy;
	}

	/**
	 * @return Returns the createdDate.
	 */
	public Date getCreatedDate() {
		return createdDate;
	}

	/**
	 * @param createdDate The createdDate to set.
	 */
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	/**
	 * @return Returns the dateEnd.
	 */
	public Date getDateEnd() {
		return dateEnd;
	}

	/**
	 * @param dateEnd The dateEnd to set.
	 */
	public void setDateEnd(Date dateEnd) {
		this.dateEnd = dateEnd;
	}

	/**
	 * @return Returns the dateStart.
	 */
	public Date getDateStart() {
		return dateStart;
	}

	/**
	 * @param dateStart The dateStart to set.
	 */
	public void setDateStart(Date dateStart) {
		this.dateStart = dateStart;
	}

	/**
	 * @return Returns the id.
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id The id to set.
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return Returns the lastModifiedBy.
	 */
	public Person getLastModifiedBy() {
		return lastModifiedBy;
	}

	/**
	 * @param lastModifiedBy The lastModifiedBy to set.
	 */
	public void setLastModifiedBy(Person lastModifiedBy) {
		this.lastModifiedBy = lastModifiedBy;
	}

	/**
	 * @return Returns the lastModifiedDate.
	 */
	public Date getLastModifiedDate() {
		return lastModifiedDate;
	}

	/**
	 * @param lastModifiedDate The lastModifiedDate to set.
	 */
	public void setLastModifiedDate(Date lastModifiedDate) {
		this.lastModifiedDate = lastModifiedDate;
	}

	/**
	 * @return Returns the applyToDivisions.
	 */
	public boolean getGlobal() {
		return global;
	}

	/**
	 * @param applyToDivisions The applyToDivisions to set.
	 */
	public void setGlobal(boolean applyToDivisions) {
		this.global = applyToDivisions;
	}

	/**
	 * @return Returns the voided.
	 */
	public boolean getVoided() {
		return voided;
	}

	/**
	 * @param voided The voided to set.
	 */
	public void setVoided(boolean voided) {
		this.voided = voided;
	}

	public String toString() {
		return("Type=" + this.getPersonPrivilegeGroupType() + "|ApplyToDivisions=" + this.global);
	}
	
}
